#{extends 'main.html' /}
#{set title:'Item' /}

<html>

<h3> Create an Item </h3>
 
<form action="@{Items.createItem()}" method="POST">
    Name <input type="text" name="name" /> <br /> <br />
    Content <textarea name="content" rows=3 cols=20> </textarea> <br> <br>
    time <input type="text" name="dateAndTime" /> <br /> <br />
    Plan <select size="1" name="planID"> 
            #{list items:plans, as:'Plan'}
                <option value="${Plan.id}">${Plan.name}</option>
            #{/list}
                    
           </select> <br> <br>
Assign User (By Username): <input type="text" id = "assigneeUsername" name="assigneeUsername"  /> 
	(This is optional, if you don't want to assign users now, leave it empty)   <br>  
    <input type="submit" value="Submit" name = "Submit" /> <br /> <br /> <br />
</form>


<p style="color:blue">
        ${result_item}
</p>

#{if flash.error}
    <p style="color:red">
        ${flash.error}
    </p>
#{/if} 

</html>